
import { http, Method } from '@/utils/request.js';

import api from '@/config/api.js';

export function login(params){
  return http.request({
    url: `${api.url}/user/login`,
    method: Method.POST,
    params,
  });
}

export function bindRoom(params){
  return http.request({
    url: `${api.url}/user/bindRoom`,
    method: Method.POST,
    params,
  });
}
export function familyBindRoom(params){
  return http.request({
    url: `${api.url}/user/familyBind`,
    method: Method.POST,
    params,
  });
}
export function visitorVerify(params){
  return http.request({
    url: `${api.url}/user/visitorVerify`,
    method: Method.POST,
    params,
  });
}
export function getFamilyList(params){
  return http.request({
    url: `${api.url}/owner/getFamilyList`,
    method: Method.GET,
    params,
  });
}
export function addFamily(params){
  return http.request({
    url: `${api.url}/owner/addFamily`,
    method: Method.POST,
    params,
  });
}
export function getVisitorList(params){
  return http.request({
    url: `${api.url}/owner/getVisitorList`,
    method: Method.GET,
    params,
  });
}
export function addVisitor(params){
  return http.request({
    url: `${api.url}/owner/addVisitor`,
    method: Method.POST,
    params,
  });
}


